function act() {
    cm.openScriptNpc()
}
var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(e, c, b) {
    var d = 8659134;
    status++;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.getMap().getReactorById(d).forceHitReactor(cm.getPlayer(), 1, 1153, 204, 0);
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, false, true);
            cm.onTeleport(0, 3, cm.getPlayer().getId(), 1067, 201);
            cm.inGameDirectionEvent_ForcedFlip(1);
            cm.inGameDirectionEvent_AskAnswerTime(250)
        } else {
            if (status === a++) {
                cm.Hidden_background("guide2", 0);
                cm.inGameDirectionEvent_OneTimeAction(2034, 9999);
                cm.inGameDirectionEvent_QTE(1000)
            } else {
                if (status === a++) {
                    cm.getMap().getReactorById(d).forceHitReactor(cm.getPlayer(), 0, 1153, 204, 0);
                    cm.getMap().getReactorById(d).forceHitReactor(cm.getPlayer(), 2, 1153, 204, 0);
                    cm.addPopupSay(9400591, 2000, "啊啊啊啊……！", "", 0);
                    cm.inGameDirectionEvent_OneTimeAction(2035, 9999);
                    cm.inGameDirectionEvent_QTE(1000)
                } else {
                    if (status === a++) {
                        cm.getMap().getReactorById(d).forceHitReactor(cm.getPlayer(), 3, 1153, 204, 0);
                        cm.addPopupSay(9400591, 2000, "我的孩子……骑士，救救我的孩子……！", "", 0);
                        cm.inGameDirectionEvent_OneTimeAction(2036, 9999);
                        cm.inGameDirectionEvent_QTE(1000)
                    } else {
                        if (status === a++) {
                            cm.fieldEffect_PlayFieldSound("Sound/PL_MONAD.img/EP1/ACT1/reactordrop3", 128);
                            cm.npc_ChangeController(9400591, "oid=2279939", 1180, 200, 63, 1130, 1230, 1, true, false);
                            cm.npc_SetSpecialAction("oid=2279939", "summon", 0, 0);
                            cm.npc_SetSpecialAction("oid=2279939", "thankyou", 0, 0);
                            cm.getMap().getReactorById(d).forceHitReactor(cm.getPlayer(), 4, 1153, 204, 0);
                            cm.setNumberForQuestInfo(64015, "chk5", 1);
                            cm.inGameDirectionEvent_AskAnswerTime(500)
                        } else {
                            if (status === a++) {
                                cm.spawnMob(9402311, 1, 1700, 271);
                                cm.spawnMob(9402313, 1, 1750, 281);
                                cm.spawnMob(9402313, 1, 1750, 281);
                                cm.spawnMob(9402242, 1, 1850, 292);
                                cm.spawnMob(9402243, 1, 1870, 293);
                                cm.spawnMob(9402242, 1, 1900, 295);
                                cm.spawnMob(9402243, 1, 1950, 299);
                                cm.spawnMob(9402242, 1, 2000, 302);
                                cm.sendNewEffects(1, [0, 0, 0, 0, 0])
                            } else {
                                if (status === a++) {
                                    cm.sendNewEffects(12, [500, 1800, 259, 0, 0])
                                } else {
                                    if (status === a++) {
                                        cm.inGameDirectionEvent_AskAnswerTime(1000)
                                    } else {
                                        if (status === a++) {
                                            cm.npc_LeaveField("oid=2279939");
                                            cm.npc_LeaveField("oid=2279939");
                                            cm.playerMessage(-1, "消灭追赶村民的暴走怪物！");
                                            cm.addPopupSay(9400596, 1000, "#face0#呃啊啊啊！光靠我们应付不过来啊！", "", 0);
                                            cm.inGameDirectionEvent_AskAnswerTime(1000)
                                        } else {
                                            if (status === a++) {
                                                cm.sendNewEffects(19, [500])
                                            } else {
                                                if (status === a++) {
                                                    cm.inGameDirectionEvent_AskAnswerTime(500)
                                                } else {
                                                    if (status === a++) {
                                                        cm.sendNewEffects(19, [0])
                                                    } else {
                                                        if (status === a++) {
                                                            cm.setInGameDirectionMode(false, true, false);
                                                            cm.getPlayer().scheduleOpenNpcTask(5, 2, "莫奈德_Act1_营救卡夫塔佩");
                                                            cm.dispose();
                                                            cm.addPopupSay(9400596, 2000, "村长！", "", 0)
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
};